# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=invoke-cradlecrafter
pkgver=19.3ff8bac
pkgrel=1
pkgdesc='PowerShell Remote Download Cradle Generator & Obfuscator.'
arch=('any')
groups=('blackarch' 'blackarch-automation')
url='https://github.com/danielbohannon/Invoke-CradleCrafter'
license=('Apache')
makedepends=('git')
source=("$pkgname::git+https://github.com/danielbohannon/Invoke-CradleCrafter")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 644 -t "$pkgdir/usr/share/windows/$pkgname/" *.ps*

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}

